/// @tags: ACAutoMaton
#include <cstdio>
#include <queue>

const int N = 601;
int n, tot, cnt = 1, cnt2;
int tr[N][26], fail[N], sta[N], fa[2500000];
char str[2500000];
bool vis[N][4100];

struct Node {
  int id, sta;
};

inline void insert(char *s, int id) {
  int cur = 0, ch;
  while (*s) {
    ch = (*s) - 'A';
    if (!tr[cur][ch]) { tr[cur][ch] = ++tot; }
    cur = tr[cur][ch];
    ++s;
  }
  sta[cur] |= 1 << (id - 1);
}

inline void getfail() {
  std::queue<int> q;
  for (int i = 0; i < 26; ++i) {
    if (tr[0][i]) q.push(tr[0][i]);
  }
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (int i = 0, v; i < 26; ++i) {
      if ((v = tr[u][i])) {
        fail[v] = tr[fail[u]][i];
        sta[v] |= sta[tr[fail[u]][i]];
        q.push(v);
      } else
        tr[u][i] = tr[fail[u]][i];
    }
  }
}

void print(int x) {
  if (x == 1) return;
  print(fa[x]);
  putchar(str[x]);
}

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("P2322[HNOI2006] 最短母串问题.in", "r", stdin);
  freopen("P2322[HNOI2006] 最短母串问题.out", "w", stdout);
#endif
#endif

  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%s", str + 1);
    insert(str + 1, i);
  }
  getfail();
  std::queue<Node> q;
  q.push(Node{0, 0});
  vis[0][0] = true;
  while (!q.empty()) {
    Node cur = q.front();
    q.pop();
    ++cnt2;
    for (int i = 0, v, s; i < 26; ++i) {
      v = tr[cur.id][i], s = cur.sta | sta[v];
      if (vis[v][s]) continue;
      fa[++cnt] = cnt2;
      str[cnt] = i + 'A';
      vis[v][s] = true;
      q.push(Node{v, s});
      if (s == ((1 << n) - 1)) {
        print(cnt);
        return 0;
      }
    }
  }
  return 0;
}
